package cn.wen.yaling.xo.dao;

import cn.wen.yaling.commons.entity.TagEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

/**
 * 
 * 
 * @author FY
 * @email 932043654@qq.com
 * @date 2022-08-13 02:07:37
 */
@Mapper
@Component
public interface TagDao extends BaseMapper<TagEntity> {

    /**
     * 通过tagId 来获取当前标签的文章数量
     * @param tagId
     * @return
     */
    Integer getCountByTagId(@Param("tagId") Integer tagId);

    /**
     * 修改批量标签为删除状态
     * @param tagIds
     * @param status
     * @return
     */
    int updateBatchIds(@Param("tagIds") Integer[] tagIds, @Param("status") int status);
}
